package policies

import (
	"gitee.com/sweetsunnyflower/carpooling-server-go/app/models/vehicle"
)

func CanViewVehicle(userId uint64, vehicle vehicle.Vehicle) bool {
	return userId == vehicle.UserId
}

func CanModifyVehicle(userId uint64, vehicle vehicle.Vehicle) bool {
	return userId == vehicle.UserId
}

func CanCreateVehicle(userId uint64, vehicle vehicle.Vehicle) bool {
	// return userId == vehicle.UserId
	return true
}

func CanUpdateVehicle(userId uint64, vehicle vehicle.Vehicle) bool {
	return userId == vehicle.UserId
}

func CanDeleteVehicle(userId uint64, vehicle vehicle.Vehicle) bool {
	return userId == vehicle.UserId
}
